Optimal. Leaf size=248 \[ \frac{2 (2-n p) \sin (e+f x) \text{Hypergeometric2F1}\left (\frac{1}{2},-\frac{n p}{2},\frac{1}{2} (2-n p),\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n}{3 a^2 f \sqrt{\sin ^2(e+f x)}}-\frac{(3-2 n p) \sin (e+f x) \cos (e+f x) \text{Hypergeometric2F1}\left (\frac{1}{2},\frac{1}{2} (1-n p),\frac{1}{2} (3-n p),\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n}{3 a^2 f \sqrt{\sin ^2(e+f x)}}-\frac{2 (2-n p) \tan (e+f x) \left (c (d \sec (e+f x))^p\right )^n}{3 a^2 f (\sec (e+f x)+1)}-\frac{\tan (e+f x) \left (c (d \sec (e+f x))^p\right )^n}{3 f (a \sec (e+f x)+a)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.451474, antiderivative size = 248, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 6, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222, Rules used = {3948, 3817, 4020, 3787, 3772, 2643} \[ \frac{2 (2-n p) \sin (e+f x) \, _2F_1\left (\frac{1}{2},-\frac{n p}{2};\frac{1}{2} (2-n p);\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n}{3 a^2 f \sqrt{\sin ^2(e+f x)}}-\frac{(3-2 n p) \sin (e+f x) \cos (e+f x) \, _2F_1\left (\frac{1}{2},\frac{1}{2} (1-n p);\frac{1}{2} (3-n p);\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n}{3 a^2 f \sqrt{\sin ^2(e+f x)}}-\frac{2 (2-n p) \tan (e+f x) \left (c (d \sec (e+f x))^p\right )^n}{3 a^2 f (\sec (e+f x)+1)}-\frac{\tan (e+f x) \left (c (d \sec (e+f x))^p\right )^n}{3 f (a \sec (e+f x)+a)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3948
Rule 3817
Rule 4020
Rule 3787
Rule 3772
Rule 2643
Rubi steps
\begin{align*} \int \frac{\left (c (d \sec (e+f x))^p\right )^n}{(a+a \sec (e+f x))^2} \, dx &=\left ((d \sec (e+f x))^{-n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int \frac{(d \sec (e+f x))^{n p}}{(a+a \sec (e+f x))^2} \, dx\\ &=-\frac{\left (c (d \sec (e+f x))^p\right )^n \tan (e+f x)}{3 f (a+a \sec (e+f x))^2}-\frac{\left ((d \sec (e+f x))^{-n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int \frac{(d \sec (e+f x))^{n p} (a (-3+n p)-a (-1+n p) \sec (e+f x))}{a+a \sec (e+f x)} \, dx}{3 a^2}\\ &=-\frac{2 (2-n p) \left (c (d \sec (e+f x))^p\right )^n \tan (e+f x)}{3 a^2 f (1+\sec (e+f x))}-\frac{\left (c (d \sec (e+f x))^p\right )^n \tan (e+f x)}{3 f (a+a \sec (e+f x))^2}-\frac{\left ((d \sec (e+f x))^{-n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int (d \sec (e+f x))^{n p} \left (-a^2 (3-2 n p) (1-n p)-2 a^2 n p (2-n p) \sec (e+f x)\right ) \, dx}{3 a^4}\\ &=-\frac{2 (2-n p) \left (c (d \sec (e+f x))^p\right )^n \tan (e+f x)}{3 a^2 f (1+\sec (e+f x))}-\frac{\left (c (d \sec (e+f x))^p\right )^n \tan (e+f x)}{3 f (a+a \sec (e+f x))^2}+\frac{\left ((3-2 n p) (1-n p) (d \sec (e+f x))^{-n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int (d \sec (e+f x))^{n p} \, dx}{3 a^2}+\frac{\left (2 n p (2-n p) (d \sec (e+f x))^{-n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int (d \sec (e+f x))^{1+n p} \, dx}{3 a^2 d}\\ &=-\frac{2 (2-n p) \left (c (d \sec (e+f x))^p\right )^n \tan (e+f x)}{3 a^2 f (1+\sec (e+f x))}-\frac{\left (c (d \sec (e+f x))^p\right )^n \tan (e+f x)}{3 f (a+a \sec (e+f x))^2}+\frac{\left ((3-2 n p) (1-n p) \left (\frac{\cos (e+f x)}{d}\right )^{n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int \left (\frac{\cos (e+f x)}{d}\right )^{-n p} \, dx}{3 a^2}+\frac{\left (2 n p (2-n p) \left (\frac{\cos (e+f x)}{d}\right )^{n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int \left (\frac{\cos (e+f x)}{d}\right )^{-1-n p} \, dx}{3 a^2 d}\\ &=\frac{2 (2-n p) \, _2F_1\left (\frac{1}{2},-\frac{n p}{2};\frac{1}{2} (2-n p);\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{3 a^2 f \sqrt{\sin ^2(e+f x)}}-\frac{(3-2 n p) \cos (e+f x) \, _2F_1\left (\frac{1}{2},\frac{1}{2} (1-n p);\frac{1}{2} (3-n p);\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{3 a^2 f \sqrt{\sin ^2(e+f x)}}-\frac{2 (2-n p) \left (c (d \sec (e+f x))^p\right )^n \tan (e+f x)}{3 a^2 f (1+\sec (e+f x))}-\frac{\left (c (d \sec (e+f x))^p\right )^n \tan (e+f x)}{3 f (a+a \sec (e+f x))^2}\\ \end{align*}
Mathematica [F] time = 1.79699, size = 0, normalized size = 0. \[ \int \frac{\left (c (d \sec (e+f x))^p\right )^n}{(a+a \sec (e+f x))^2} \, dx \]
Verification is Not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.161, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( c \left ( d\sec \left ( fx+e \right ) \right ) ^{p} \right ) ^{n}}{ \left ( a+a\sec \left ( fx+e \right ) \right ) ^{2}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{\left (\left (d \sec \left (f x + e\right )\right )^{p} c\right )^{n}}{a^{2} \sec \left (f x + e\right )^{2} + 2 \, a^{2} \sec \left (f x + e\right ) + a^{2}}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{\left (c \left (d \sec{\left (e + f x \right )}\right )^{p}\right )^{n}}{\sec ^{2}{\left (e + f x \right )} + 2 \sec{\left (e + f x \right )} + 1}\, dx}{a^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (\left (d \sec \left (f x + e\right )\right )^{p} c\right )^{n}}{{\left (a \sec \left (f x + e\right ) + a\right )}^{2}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]